package routers

import (
	"day12_10_homework/conterlles"
	"day12_10_homework/middle"
	"github.com/gin-gonic/gin"
)

func SetUserRouters(c *gin.Engine) {
	//路由组
	userServes := c.Group("/user")
	{
		userServes.POST("/register", conterlles.UserRegister)
		userServes.POST("/login", conterlles.UserLogin)
		userServes.POST("/sendSms", conterlles.SendSms)
		//使用中间件
		userServes.Use(middle.AuthMiddle())
		{
			userServes.POST("/realName", conterlles.CreateRealName)
		}
	}
}
